<?php
/**
* @software         [JiJinCMS]
* @author           [上海集锦信息科技有限公司]
* @website          [http://www.jijinweb.com]
* @email            [sunny@jijinweb.com]
**/
namespace app\admin\validate;
use think\validate;
//验证store_name,province,city,area,contact_name,mobile为必填字段
//检测mobile是否为正确的手机号码
//验证mobile是否重复
class MemberValidate extends validate{
    protected $rule = [
        'store_name'    => 'require',
        'province'      => 'require',
        'city'          => 'require',
        'area'          => 'require',
        'address'          => 'require',
        'contact_name'  => 'require',

    ];

    protected $message = [
        'store_name.require'    => '门店名称不能为空',
        'province.require'      => '所在省份不能为空',
        'city.require'          => '所在城市不能为空',
        'area.require'          => '所在区域不能为空',
        'address.require'       => '详细地址不能为空',
        'contact_name.require'  => '联系人不能为空',
        'mobile.require'        => '手机号码不能为空',
        'mobile.mobile'         => '请输入正确的手机号码',
        'mobile.unique'         => '手机号码已存在',

    ];
}

